package com.doordu.soa.service.data.vo;

import java.io.Serializable;

import com.doordu.soa.service.web.annotation.DataValid;
import com.doordu.soa.service.web.em.RegexType;
import com.doordu.soa.service.web.fieldvalidator.IntegerChoiceHandler;

import io.swagger.annotations.ApiModelProperty;

/**
 * 统一请求参数[vo类]
 * @ClassName: RequestVo
 * @Description: 
 * @author xiaoqun.yi yixq@doordu.com  
 * @date 2017年9月29日 下午2:27:36
 * @version V1.0
 */
public class RequestVo implements Serializable {
	/**
	 * @Fields serialVersionUID :
	 */
	private static final long serialVersionUID = 1L;
	@DataValid(description = "访问令牌", maxLength = 50, nullable = false, regexType = RegexType.NO_SPECIALCHAR)
	@ApiModelProperty(value = "访问令牌(50)", notes = "访问令牌(50)", required = true, dataType = "string")
	private String accessToken;

	@DataValid(description = "同步类型", maxLength = 1, nullable = false, checkHandler = IntegerChoiceHandler.class, choice = {
			1, 2 })
	@ApiModelProperty(value = "同步类型(1：单次  2：批次)", notes = "同步类型(1：单次  2：批次)", required = true, dataType = "int")
	private Short operateType;

	@DataValid(description = "是否gzip压缩", maxLength = 1, nullable = false, checkHandler = IntegerChoiceHandler.class, choice = {
			0, 1 })
	@ApiModelProperty(value = "是否gzip压缩(0：不压缩  1：gzip压缩) ", notes = "是否gzip压缩(0：不压缩  1：gzip压缩) ", required = true, dataType = "int")
	private Short gzipFlag;

	@DataValid(description = "data业务JSON串", nullable = false)
	@ApiModelProperty(value = "data业务JSON串 ", notes = "data业务JSON串", required = true, dataType = "String")
	private String data;

	@ApiModelProperty(hidden = true)
	private Integer companyId;

	public String getAccessToken() {
		return accessToken;
	}

	public void setAccessToken(String accessToken) {
		this.accessToken = accessToken;
	}

	public Short getOperateType() {
		return operateType;
	}

	public void setOperateType(Short operateType) {
		this.operateType = operateType;
	}

	public Short getGzipFlag() {
		return gzipFlag;
	}

	public void setGzipFlag(Short gzipFlag) {
		this.gzipFlag = gzipFlag;
	}

	public String getData() {
		return data;
	}

	public void setData(String data) {
		this.data = data;
	}

	public Integer getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	}
}
